package com.hos.operation.manager;
import com.qiniu.util.Auth;

/**
 * 7牛云上传获取凭证
 * Created by guom on 2018/10/28.
 */
public class Yun7NManager {
    private static Yun7NManager manager;

    public static Yun7NManager getInstance() {
        if (manager == null) {
            manager = new Yun7NManager();
        }
        return manager;
    }

    public String getToken() {
        //AccessKey的值
        String accessKey = "ZSUfJhEpSjYTNWC7S0uOSSGT5aKLQUk7ESmxXRyl";
        //SecretKey的值
        String secretKey = "Y4LfZfF9V9pCICK16jcKgI5yRGDl_k0cZVlcbrdk";
        //存储空间名
        String bucket = "hospital";
        Auth auth = Auth.create(accessKey, secretKey);
        String upToken = auth.uploadToken(bucket);
        return upToken;
    }
}
